@echo off
set CurrentPath=%~dp0
set P1Path=
:begin
for /f "tokens=1,* delims=\" %%i in ("%CurrentPath%") do (set content=%%i&&set CurrentPath=%%j)
if "%P1Path%%content%\" == "%~dp0" goto end
set P1Path=%P1Path%%content%\
goto begin
:end
for /f "tokens=1,2 delims=: skip=1 eol=#" %%i in (%P1Path%JM_config) do (echo %%i %%j
ssh Administrator@%%i "cd C:/Users/Administrator/jmeterEnv/ && mkdir Matset_jmx"
scp -P 22 -r %P1Path%Matset_jmx\*.jmx Administrator@%%i:/C:/Users/Administrator/jmeterEnv/Matset_jmx/
scp -P 22 -r %P1Path%Matset_jmx\csv Administrator@%%i:/C:/Users/Administrator/jmeterEnv/Matset_jmx/

rem csv 传输到 %JMETER_HOME%\bin  
scp -P 22 -r %P1Path%Matset_jmx\csv  Administrator@%%i:/C:/Users/Administrator/jmeterEnv/jmeter/apache-jmeter-5.1.1/bin/
)



pause